<html>
<head>
	<title>{{ appname }} - Post questions, share information and collaborate with anyone</title>
	<link rel="stylesheet" type="text/css" href="/static/site.css" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<div id="header">
		<p style="float: right; text-align: right; padding-top: 10px; width: 45%">{% if user %}{{ user.nickname }} &ndash; <a href="/logout">Logout</a>{% else %}<a href="/login">Login</a>{% endif %}</p>
		<p style="float: left; width: 45%"><a href="/"><img src="/static/mobsmarts.png" alt="{{ appname }}" border="0" /></a><br /><span id="description">Post questions, share information and collaborate with anyone</span></p>
	</div>

	<div id="main">
		<div id="post">
			<h2>Posts Tagged "{{ tag|capfirst }}"</h2>

			<p align="right">
				Sort by:&nbsp;
				{% ifequal sort 'alpha' %}
				<a href="/tag?tag={{ tag }}">Date</a>
				&nbsp;|&nbsp;
				<strong>Alpha</strong>
				{% endifequal %}
				{% ifnotequal sort 'alpha' %}
				<strong>Date</strong>
				&nbsp;|&nbsp;
				<a href="/tag?tag={{ tag }}&sort=alpha">Alpha</a>
				{% endifnotequal %}
			</p>

			<ul>
			{% for post in posts %}
				<li><a href="/post?pid={{ post.id }}">{{ post.title }}</a></li>
			{% endfor %}
			</ul>
		</div>
		<div id="sidebar">
			<h2>Recent Posts</h2>
			<ul>
			{% for post in recent_posts %}
				<li><a href="/post?pid={{ post.id }}">{{ post.title }}</a></li>
			{% endfor %}
			</ul>
			<h2>Tag Cloud</h2>
			<p class="tag-cloud">
			{% for tag in tags %}
			<a href="/tag?tag={{ tag.name }}" class="tag tag-{{ tag.frequency }}">{{ tag.name|capfirst }}</a>
			{% endfor %}
			</p>
		</div>
		<br clear="both" /><br />
	</div>

	<div id="footer">
		&copy; <a href="http://www.companymachine.com/">Company Machine</a> 2008
	</div>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("{{ analytics }}");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</body>
</html>